package org.gas.barapraja.handler.validator;

import com.logica.smpp.pdu.Request;

/**
 * Request validator interface is an interface for validating incoming request to gas-server
 * @author gilang
 * @see {@link org.gas.barapraja.handler.validator.RequestValidatorImpl}
 */
public interface RequestValidator {
	
	/**
	 * flag for user if tokens is in sufficient condition
	 */
	public final static int TOKEN_OK=1;
	
	/**
	 * flag for user if tokens is in insufficient conditions 
	 */
	public final static int TOKEN_NOT_OK=0;
	
	/**
	 * validate the incoming message
	 * @param request the incoming request
	 * @return int (validity flag)
	 */
	int validate(Request request);
}
